import React from 'react';
import styles from './index.css';
import { Link, history } from 'umi';
import { Button } from 'antd'

let User =  () => {
  let users = [
    {
      id: 'acb1523',
      name: 'xinglong.shi'
    }
  ]
  return (
    <div>
      <h1 className={styles.title}>Page Users</h1>
      <ul>
        {
          users.map(item => (
            <li key={item.id}
              // onClick={() => history.push(`/users/${item.id}`)}
            >
              <Button type="primary" >
                <Link to={`/users/${item.id}`}>
                  {item.name}
                </Link>
              </Button>
              {/* {item.name} */}
            </li>
          ))
        }
      </ul>
    </div>
  );
}

User.wrappers = ['@/wrappers/auth']

export default User;